package com.example.demo.result;

/**
 * @Author: njz
 * @Description:
 * @Date: create in 2022/7/4 17:16
 */
public class BaseResult {

    private int code;

    private String msg;

    private Object data;

    public BaseResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public BaseResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static BaseResult result(int code, String msg){
        return new BaseResult(code, msg);
    }

    public static BaseResult result(int code, String msg, Object data){
        return new BaseResult(code, msg, data);
    }
}
